using Services;
using UnityEngine;
using UnityEngine.UI;

public class PlayerInformation : MonoBehaviour
{
    private Player player;
    private Text m_text;

    private void Start()
    {
        ContainerUI_Manager manager = GetComponentInParent<ContainerUI_Manager>();
        m_text = GetComponentInChildren<Text>();
        player = ServiceLocator.Get<ActionController>().player;
        player.EquipmentManager.EquipmentChange += Show;
        player.StatusChange += Show;
    }

    public void Show()
    {
        m_text.text = player.data.GetInformation();
    }
}